<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>登录页</title>
    <link rel="stylesheet" href="../css/zcdl.css">
    <link rel="stylesheet" href="../css/font/iconfont.css">
</head>

<body>
    <div id="zhuce">
        <p><i class="iconfont icon-Nike"></i></p>
        <h2>登录NIKE账号</h2>
        <input type="text" placeholder="用户名" id="username">
        <br>
        <span class="yanzhen1"></span>
        <br>
        <input type="password" placeholder="密码" id="password">
        <br>
        <span class="yanzhen2"></span>
        <p style="margin-left: -158px;">使用电子邮箱登录。</p>
        <p style="font-size: 14px;"><input type="checkbox"><label
                for="">保持登录状态</label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span>忘记密码？</span>
        </p>
        <p style="font-size: 12px;color: rgb(80, 79, 79);">一旦登录，即表明你同意Nike的隐私政策和使用条例</p>
        <button>登录</button>
        <br>
        <a href="./2zhuce.html" style="font-size:12px">还不是会员？加入我们</a>
    </div>
</body>
<script src="../js/jquery-1.11.3.js"></script>
<script src="../js/tools.js"></script>
<script src="../js/dy.js"></script>
<script src="../layui/layui.js"></script>
<script>
    layui.use('layer', function () {
        $('button').click(function () {
            var username = $('#username').val();
            var password = $('#password').val();
            APIdenglu({
                username,
                password
            }).then(data => {
                var { code, msg } = data;
                if (code) {
                    layer.msg(msg);
                    location.href = './1shouye.html';
                    setCookie('login_user', username, 7);
                } else {
                    alert(msg);
                }
            })
        })
    })
</script>

</html>